<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="f" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script type="text/javascript" src="resource/my97date/WdatePicker.js"></script>
    <link rel="stylesheet" href="resource/css/bootstrap.css">
    <script type="text/javascript" src="resource/js/jquery-3.2.1.js"></script>
    <script src="resource/js/bootstrap.js"></script>

    <title></title>
</head>
<body>
<a href="toadd">添加</a>
<form action="list" method="post">
    <input type="hidden" name="pageNum">
    收货单号:<input type="text" name="shdh" value="${vo.shdh}">
    <select name="sj">
        <option value="">--请选择--</option>
        <option value="g.ztime">--制单时间--</option>
        <option value="g.stime">--收货时间--</option>
    </select>
    <input type="date" name="sj1" value="">至<input type="date" name="sj2" value="">
    优先级<input type="text" name="yx1" value="">至<input type="text" name="yx2" value=""><br>
    <select name="alll">
        <option value="">--请选择--</option>
        <option value="1">客户</option>
        <option value="2">客户发货单</option>
        <option value="3">制单人</option>
        <option value="4">制单人工号</option>
    </select>
    <input type="text" name="allln" value="${vo.allln}">
    排序<select name="px">
            <option value="">请选择</option>
            <option value="1">升序</option>
            <option value="2">降序</option>
        </select>
    备注<input type="text" name="bz" value="${vo.bz}">
    <input type="submit" value="查询">
</form>
<table border="1">
    <tr>
        <td>编号</td>
        <td>收货日期</td>
        <td>收货单号</td>
        <td>优先级</td>
        <td>状态</td>
        <td>备注</td>
        <td>客户</td>
        <td>客户发货单列表</td>
        <td>制单人工号</td>
        <td>制单人</td>
        <td>制单时间</td>
        <td>收货附件</td>
        <td>操作</td>
    </tr>
    <c:forEach items="${info.list}" var="list">
        <tr>
            <td>${list.id}</td>
            <td><f:formatDate value="${list.stime}" pattern="yyyy-MM-dd"/></td>
            <td>${list.gnumber}</td>
            <td>${list.yname}</td>
            <td>${list.zname}</td>
            <td>${list.remark}</td>
            <td>${list.client}</td>
            <td>${list.khfsid}</td>
            <td>${list.unumber}</td>
            <td>${list.uname}</td>
            <td><f:formatDate value="${list.ztime}" pattern="yyyy-MM-dd"/></td>
            <td>${list.picture}</td>
            <td><a href="#" onclick="up(${list.id})">取消</a></td>
        </tr>
    </c:forEach>
</table>
    <jsp:include page="/resource/page/pages.jsp"></jsp:include>
<script>
    $("[name='alll']").val(${vo.alll});
    $("[name='px']").val(${vo.px});
    $("[name='sj']").val(${vo.sj});
    function goPage(pageNum) {
        $("[name='pageNum']").val(pageNum);
        $("form").submit();
    }
    function up(id) {
        $.post("upgoods",{"id":id},function (obj) {
            if(obj){
                alert("修改成功");
                location.reload();
            }else{
                alert("修改失败");
            }
        })
    }
</script>
</body>
</html>